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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.o: H = None
        self.q: I = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.q: I = None
        self.y: G = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.r: J = None
        self.o: F = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: H = None
        self.u: C = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.t: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: B = None
        self.o: H = None
        self.q: I = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: E = None
        self.q: I = None
        self.y: G = None
        self.u: A = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.r: J = None
        self.o: F = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: H = None
        self.u: C = None
        self.x: A = None
        self.t: H = None
        self.txt = txt

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

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

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