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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.v: F = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: C = None
        self.v: F = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

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

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

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