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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: E = None
        self.x: D = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

j.t = k
j.s = f
j.z = a
j.o = h
c.y = f
c.s = f
c.r = b
l.x = e
h.t = f
h.z = l
a.z = e
a.t = b
a.p = b
a.w = b
a.x = h
g.r = l
g.t = h
f.r = l
f.t = h
e.t = c
e.s = g
e.z = a
e.o = h
b.z = e
b.t = a
b.p = a
b.w = a
b.x = h
k.y = g
k.s = g
k.r = b
assert h.z.x.s.r.x.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: F = None
        self.z: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: E = None
        self.x: D = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

j.t = k
j.s = f
j.z = a
j.o = h
c.y = f
c.s = f
c.r = b
l.x = e
h.t = f
h.z = l
a.z = e
a.t = b
a.p = b
a.w = b
a.x = h
g.r = l
g.t = h
f.r = l
f.t = h
e.t = c
e.s = g
e.z = a
e.o = h
b.z = e
b.t = a
b.p = a
b.w = a
b.x = h
k.y = g
k.s = g
k.r = b
assert h.z.x.s.r.x.t.txt == "c"