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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: E = None
        self.w: J = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.p: J = None
        self.v: D = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: G = None
        self.t: E = None
        self.w: J = None
        self.z: E = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: C = None
        self.r: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.p: J = None
        self.v: D = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

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

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

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

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