class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.z: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.z: F = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

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

e.w = h
e.u = b
e.z = f
e.v = j
l.u = h
l.o = f
l.r = i
j.w = e
j.s = h
j.u = h
j.o = h
j.z = f
g.q = h
g.u = j
i.y = h
f.v = i
f.u = j
f.z = g
h.x = d
d.x = f
d.y = i
k.s = e
b.y = d
b.t = d
b.v = h
assert h.x.y.y.x.x.z.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: J = None
        self.z: F = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: G = None
        self.z: F = None
        self.u: G = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: G = None
        self.t: H = None
        self.txt = txt

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

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