class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.q: H = None
        self.u: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.o: E = None
        self.x: E = None
        self.t: C = None
        self.r: G = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.w: G = None
        self.x: C = None
        self.z: B = None
        self.r: C = None
        self.y: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.u: F = None
        self.s: A = None
        self.t: D = None
        self.o: H = None
        self.q: F = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.o: E = None
        self.x: E = None
        self.t: C = None
        self.r: G = None
        self.p: B = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: A = None
        self.w: G = None
        self.x: C = None
        self.z: B = None
        self.r: C = None
        self.y: G = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: A = None
        self.u: F = None
        self.s: A = None
        self.t: D = None
        self.o: H = None
        self.q: F = None
        self.w: E = None
        self.txt = txt

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

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

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