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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.p: F = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

i = A("i")
b = B("b")
h = C("h")
k = D("k")
e = E("e")
d = F("d")
a = C("a")
j = D("j")
l = F("l")

i.y = b
i.t = b
i.x = h
i.r = h
i.z = e
i.s = d
b.o = d
b.u = d
b.x = i
b.v = k
h.o = b
h.p = e
k.t = i
k.z = i
k.o = j
e.v = i
e.r = j
d.x = i
d.s = a
d.p = l
d.z = l
d.v = l
a.o = b
a.p = e
j.t = i
j.z = i
j.o = k
l.x = i
l.s = h
l.p = d
l.z = d
l.v = d
assert b.v.t.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: B = None
        self.x: C = None
        self.z: E = None
        self.s: F = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: F = None
        self.x: A = None
        self.v: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: C = None
        self.p: F = None
        self.z: F = None
        self.v: F = None
        self.txt = txt

i = A("i")
b = B("b")
h = C("h")
k = D("k")
e = E("e")
d = F("d")
a = C("a")
j = D("j")
l = F("l")

i.y = b
i.t = b
i.x = h
i.r = h
i.z = e
i.s = d
b.o = d
b.u = d
b.x = i
b.v = k
h.o = b
h.p = e
k.t = i
k.z = i
k.o = j
e.v = i
e.r = j
d.x = i
d.s = a
d.p = l
d.z = l
d.v = l
a.o = b
a.p = e
j.t = i
j.z = i
j.o = k
l.x = i
l.s = h
l.p = d
l.z = d
l.v = d
assert b.v.t.s.txt == "d"