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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

h = A("h")
g = B("g")
b = C("b")
k = D("k")
d = E("d")
c = F("c")
i = G("i")
a = C("a")
n = G("n")
l = B("l")

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

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

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: D = None
        self.y: C = None
        self.o: F = None
        self.txt = txt

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

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

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

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

h = A("h")
g = B("g")
b = C("b")
k = D("k")
d = E("d")
c = F("c")
i = G("i")
a = C("a")
n = G("n")
l = B("l")

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