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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: D = None
        self.x: D = None
        self.s: B = None
        self.txt = txt

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

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

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