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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

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

e = A("e")
m = B("m")
b = C("b")
j = D("j")
c = E("c")
a = F("a")

e.o = a
e.w = b
m.y = j
m.z = b
m.u = b
m.w = e
m.q = e
b.o = m
b.p = j
b.u = e
b.z = a
j.x = e
j.z = e
j.y = b
j.v = b
j.w = c
c.t = j
c.q = j
a.s = e
a.r = b
assert b.o.y.x.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: D = None
        self.u: A = None
        self.z: F = None
        self.txt = txt

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

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

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

e = A("e")
m = B("m")
b = C("b")
j = D("j")
c = E("c")
a = F("a")

e.o = a
e.w = b
m.y = j
m.z = b
m.u = b
m.w = e
m.q = e
b.o = m
b.p = j
b.u = e
b.z = a
j.x = e
j.z = e
j.y = b
j.v = b
j.w = c
c.t = j
c.q = j
a.s = e
a.r = b
assert b.o.y.x.o.txt == "a"