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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.o: C = None
        self.y: J = None
        self.x: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.w: E = None
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.v: F = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: D = None
        self.u: E = None
        self.s: E = None
        self.t: H = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.y: F = None
        self.s: E = None
        self.r: C = None
        self.q: E = None
        self.v: A = None
        self.x: I = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.o: C = None
        self.y: J = None
        self.x: A = None
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.w: E = None
        self.x: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: A = None
        self.v: F = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: D = None
        self.u: E = None
        self.s: E = None
        self.t: H = None
        self.r: D = None
        self.o: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: F = None
        self.y: F = None
        self.s: E = None
        self.r: C = None
        self.q: E = None
        self.v: A = None
        self.x: I = None
        self.o: C = None
        self.t: H = None
        self.txt = txt

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

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