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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.w: J = None
        self.t: G = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.u: J = None
        self.x: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: F = None
        self.w: J = None
        self.t: G = None
        self.y: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: I = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: J = None
        self.u: J = None
        self.x: J = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: A = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

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

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

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