class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: E = None
        self.w: E = None
        self.y: D = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.x: A = None
        self.z: C = None
        self.v: F = None
        self.u: D = None
        self.y: G = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.o: G = None
        self.y: G = None
        self.q: B = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: H = None
        self.s: F = None
        self.q: H = None
        self.p: D = None
        self.t: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: A = None
        self.r: B = None
        self.x: E = None
        self.q: E = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.x: F = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.u: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

g = A("g")
k = B("k")
c = C("c")
e = D("e")
i = E("i")
j = F("j")
l = G("l")
b = H("b")
f = F("f")
n = C("n")

g.q = k
g.x = i
g.w = i
g.r = i
g.y = e
g.z = b
k.q = b
k.t = n
k.z = n
k.x = g
k.v = j
k.u = e
k.y = l
k.r = i
c.o = b
c.z = i
c.x = l
e.r = l
e.o = l
e.y = l
e.v = c
e.w = c
e.z = c
e.q = k
i.w = e
i.p = e
i.y = b
i.q = b
i.s = f
i.t = l
i.r = j
j.w = e
j.s = k
j.r = k
j.u = k
j.t = g
j.x = i
j.q = i
j.y = b
l.q = n
l.t = n
l.w = k
l.x = j
l.v = c
b.t = g
b.v = g
b.p = k
b.u = l
b.z = l
f.w = e
f.s = k
f.r = k
f.u = k
f.t = g
f.x = i
f.q = i
f.y = b
n.o = b
n.z = i
n.x = l
assert j.w.v.x.w.u.o.x.s.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: E = None
        self.w: E = None
        self.y: D = None
        self.z: H = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.x: A = None
        self.z: C = None
        self.v: F = None
        self.u: D = None
        self.y: G = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: E = None
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: C = None
        self.o: G = None
        self.y: G = None
        self.q: B = None
        self.w: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: H = None
        self.s: F = None
        self.q: H = None
        self.p: D = None
        self.t: G = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: B = None
        self.t: A = None
        self.r: B = None
        self.x: E = None
        self.q: E = None
        self.y: H = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.w: B = None
        self.x: F = None
        self.v: C = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.u: G = None
        self.v: A = None
        self.z: G = None
        self.txt = txt

g = A("g")
k = B("k")
c = C("c")
e = D("e")
i = E("i")
j = F("j")
l = G("l")
b = H("b")
f = F("f")
n = C("n")

g.q = k
g.x = i
g.w = i
g.r = i
g.y = e
g.z = b
k.q = b
k.t = n
k.z = n
k.x = g
k.v = j
k.u = e
k.y = l
k.r = i
c.o = b
c.z = i
c.x = l
e.r = l
e.o = l
e.y = l
e.v = c
e.w = c
e.z = c
e.q = k
i.w = e
i.p = e
i.y = b
i.q = b
i.s = f
i.t = l
i.r = j
j.w = e
j.s = k
j.r = k
j.u = k
j.t = g
j.x = i
j.q = i
j.y = b
l.q = n
l.t = n
l.w = k
l.x = j
l.v = c
b.t = g
b.v = g
b.p = k
b.u = l
b.z = l
f.w = e
f.s = k
f.r = k
f.u = k
f.t = g
f.x = i
f.q = i
f.y = b
n.o = b
n.z = i
n.x = l
assert j.w.v.x.w.u.o.x.s.q.z.txt == "l"