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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: E = None
        self.o: F = None
        self.u: H = None
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: I = None
        self.t: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.r: D = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: E = None
        self.o: F = None
        self.u: H = None
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: I = None
        self.t: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: F = None
        self.r: D = None
        self.z: I = None
        self.txt = txt

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

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