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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.s: A = None
        self.q: B = None
        self.o: B = None
        self.txt = txt

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

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

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

a = A("a")
f = B("f")
j = C("j")
e = D("e")
b = E("b")
i = F("i")
l = D("l")

a.o = i
a.q = i
f.u = b
f.y = a
f.r = j
f.w = j
f.s = i
j.v = f
j.q = f
j.o = f
j.z = l
j.s = a
e.o = l
e.u = i
e.z = i
e.x = i
b.u = i
b.o = i
b.s = j
b.x = j
b.r = f
b.y = a
i.o = j
i.s = f
i.z = l
l.o = e
l.u = i
l.z = i
l.x = i
assert f.y.o.z.o.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: D = None
        self.s: A = None
        self.q: B = None
        self.o: B = None
        self.txt = txt

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

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

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

a = A("a")
f = B("f")
j = C("j")
e = D("e")
b = E("b")
i = F("i")
l = D("l")

a.o = i
a.q = i
f.u = b
f.y = a
f.r = j
f.w = j
f.s = i
j.v = f
j.q = f
j.o = f
j.z = l
j.s = a
e.o = l
e.u = i
e.z = i
e.x = i
b.u = i
b.o = i
b.s = j
b.x = j
b.r = f
b.y = a
i.o = j
i.s = f
i.z = l
l.o = e
l.u = i
l.z = i
l.x = i
assert f.y.o.z.o.u.o.txt == "j"