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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

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