class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: G = None
        self.w: F = None
        self.o: F = None
        self.x: E = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.p: G = None
        self.u: G = None
        self.x: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: B = None
        self.o: F = None
        self.t: B = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: A = None
        self.p: G = None
        self.u: G = None
        self.x: B = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: B = None
        self.o: F = None
        self.t: B = None
        self.q: I = None
        self.y: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: I = None
        self.txt = txt

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

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