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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.txt = txt

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

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

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