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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: J = None
        self.w: C = None
        self.x: I = None
        self.s: J = None
        self.u: H = None
        self.r: J = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: J = None
        self.p: B = None
        self.q: I = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.x: I = None
        self.r: I = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.z: B = None
        self.v: B = None
        self.x: H = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: I = None
        self.r: B = None
        self.q: E = None
        self.z: A = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: J = None
        self.w: C = None
        self.x: I = None
        self.s: J = None
        self.u: H = None
        self.r: J = None
        self.v: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: J = None
        self.p: B = None
        self.q: I = None
        self.u: H = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.x: I = None
        self.r: I = None
        self.u: H = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.z: B = None
        self.v: B = None
        self.x: H = None
        self.t: B = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: I = None
        self.r: B = None
        self.q: E = None
        self.z: A = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.p: D = None
        self.t: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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