class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.s: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.w: B = None
        self.r: C = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.t: E = None
        self.s: E = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.w: B = None
        self.r: C = None
        self.v: F = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.r: A = None
        self.o: H = None
        self.txt = txt

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

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