class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.q: D = None
        self.x: C = None
        self.r: A = None
        self.p: B = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.u: H = None
        self.v: F = None
        self.q: C = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: B = None
        self.u: H = None
        self.v: F = None
        self.q: C = None
        self.s: H = None
        self.t: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: F = None
        self.x: D = None
        self.txt = txt

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

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