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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
e = C("e")
k = D("k")
l = E("l")
b = F("b")

d.z = l
d.t = l
d.w = c
d.v = k
c.x = b
c.y = l
c.z = l
c.r = k
c.u = d
e.y = k
k.x = d
k.w = d
k.o = e
l.y = e
l.s = b
b.u = d
b.w = d
b.r = l
b.t = c
b.v = c
b.s = e
assert c.y.y.y.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: B = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
e = C("e")
k = D("k")
l = E("l")
b = F("b")

d.z = l
d.t = l
d.w = c
d.v = k
c.x = b
c.y = l
c.z = l
c.r = k
c.u = d
e.y = k
k.x = d
k.w = d
k.o = e
l.y = e
l.s = b
b.u = d
b.w = d
b.r = l
b.t = c
b.v = c
b.s = e
assert c.y.y.y.o.y.txt == "k"