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

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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

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