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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: A = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.txt = txt

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

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

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

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