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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: J = None
        self.r: J = None
        self.y: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.q: J = None
        self.y: A = None
        self.v: A = None
        self.t: G = None
        self.w: E = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: J = None
        self.w: A = None
        self.p: B = None
        self.y: D = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: J = None
        self.r: J = None
        self.y: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: G = None
        self.q: J = None
        self.y: A = None
        self.v: A = None
        self.t: G = None
        self.w: E = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: J = None
        self.w: A = None
        self.p: B = None
        self.y: D = None
        self.t: E = None
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: C = None
        self.txt = txt

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

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