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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.v: B = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: B = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.w: C = None
        self.p: D = None
        self.z: J = None
        self.s: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: I = None
        self.q: H = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: B = None
        self.v: B = None
        self.t: A = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.w: G = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: G = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.w: B = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.v: F = None
        self.w: C = None
        self.p: D = None
        self.z: J = None
        self.s: H = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: I = None
        self.q: H = None
        self.v: G = None
        self.z: B = None
        self.txt = txt

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

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