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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.p: E = None
        self.y: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: E = None
        self.p: E = None
        self.y: A = None
        self.q: E = None
        self.x: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

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

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