class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.s: F = None
        self.r: E = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.x: F = None
        self.v: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.q: G = None
        self.t: D = None
        self.p: G = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.s: F = None
        self.r: E = None
        self.o: G = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.x: F = None
        self.v: H = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.r: A = None
        self.q: G = None
        self.t: D = None
        self.p: G = None
        self.z: F = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

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