class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.u: F = None
        self.v: C = None
        self.o: D = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.u: F = None
        self.v: C = None
        self.o: D = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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