class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: E = None
        self.v: E = None
        self.s: G = None
        self.r: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: A = None
        self.x: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: D = None
        self.s: A = None
        self.r: D = None
        self.txt = txt

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

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