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

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

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

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

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

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

e = A("e")
g = B("g")
l = C("l")
b = D("b")
m = E("m")
f = F("f")

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

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

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

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

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

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

e = A("e")
g = B("g")
l = C("l")
b = D("b")
m = E("m")
f = F("f")

e.x = m
e.p = g
e.v = g
e.r = b
g.u = e
l.z = e
l.x = g
l.o = g
l.y = b
l.w = b
l.p = m
b.w = e
b.z = l
b.t = g
m.s = l
m.w = l
m.u = b
m.z = g
m.x = e
m.t = e
f.x = g
f.r = g
f.o = g
f.v = e
f.w = e
f.s = b
assert e.p.u.p.u.txt == "e"