class A:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: E = None
        self.w: D = None
        self.z: F = None
        self.o: E = None
        self.u: B = None
        self.r: J = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.w: G = None
        self.o: I = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: J = None
        self.q: E = None
        self.w: D = None
        self.z: F = None
        self.o: E = None
        self.u: B = None
        self.r: J = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

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

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

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