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

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

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

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

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

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

a = A("a")
b = B("b")
l = C("l")
i = D("i")
m = E("m")
g = F("g")
k = A("k")
j = C("j")

a.p = m
a.w = m
a.s = b
a.y = j
a.o = i
b.y = g
b.r = a
l.x = b
l.w = i
l.z = i
l.p = m
i.x = j
i.u = j
i.s = m
i.o = m
i.z = b
m.y = i
m.q = i
m.o = g
m.x = l
m.r = k
g.y = b
g.x = k
g.t = i
k.p = m
k.w = m
k.s = b
k.y = j
k.o = i
j.x = b
j.w = i
j.z = i
j.p = m
assert j.p.y.z.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.y: C = None
        self.o: D = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
b = B("b")
l = C("l")
i = D("i")
m = E("m")
g = F("g")
k = A("k")
j = C("j")

a.p = m
a.w = m
a.s = b
a.y = j
a.o = i
b.y = g
b.r = a
l.x = b
l.w = i
l.z = i
l.p = m
i.x = j
i.u = j
i.s = m
i.o = m
i.z = b
m.y = i
m.q = i
m.o = g
m.x = l
m.r = k
g.y = b
g.x = k
g.t = i
k.p = m
k.w = m
k.s = b
k.y = j
k.o = i
j.x = b
j.w = i
j.z = i
j.p = m
assert j.p.y.z.y.t.txt == "i"