class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.u: E = None
        self.p: D = None
        self.t: F = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.s: E = None
        self.y: E = None
        self.z: E = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
i = E("i")
h = F("h")
f = G("f")
a = D("a")

l.o = i
l.w = n
n.o = m
m.v = h
m.t = h
m.x = f
m.o = f
m.u = i
m.p = a
m.w = l
j.o = i
j.x = i
j.s = i
j.y = i
j.z = i
j.t = l
j.p = a
i.w = h
i.o = h
h.q = f
f.r = l
f.p = l
f.u = m
a.o = i
a.x = i
a.s = i
a.y = i
a.z = i
a.t = l
a.p = j
assert i.w.q.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.u: E = None
        self.p: D = None
        self.t: F = None
        self.o: G = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.s: E = None
        self.y: E = None
        self.z: E = None
        self.t: A = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

l = A("l")
n = B("n")
m = C("m")
j = D("j")
i = E("i")
h = F("h")
f = G("f")
a = D("a")

l.o = i
l.w = n
n.o = m
m.v = h
m.t = h
m.x = f
m.o = f
m.u = i
m.p = a
m.w = l
j.o = i
j.x = i
j.s = i
j.y = i
j.z = i
j.t = l
j.p = a
i.w = h
i.o = h
h.q = f
f.r = l
f.p = l
f.u = m
a.o = i
a.x = i
a.s = i
a.y = i
a.z = i
a.t = l
a.p = j
assert i.w.q.u.t.txt == "h"