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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.y: H = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.y: H = None
        self.v: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.o: C = None
        self.y: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: A = None
        self.txt = txt

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

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