class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: E = None
        self.r: A = None
        self.p: F = None
        self.u: F = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

d.s = b
d.r = b
d.t = b
d.y = m
d.p = c
d.u = c
h.p = k
h.r = m
h.t = m
h.u = c
k.t = c
e.y = h
e.o = h
e.t = a
e.v = a
e.s = k
m.z = e
m.s = k
c.s = k
a.y = h
a.o = h
a.t = e
a.v = e
a.s = k
b.s = d
b.r = d
b.t = d
b.y = m
b.p = c
b.u = c
assert b.u.s.t.s.t.s.txt == "k"