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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.y: G = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.y: G = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

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