class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: D = None
        self.x: D = None
        self.r: I = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: H = None
        self.v: I = None
        self.x: F = None
        self.q: I = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: J = None
        self.x: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: H = None
        self.v: I = None
        self.x: F = None
        self.q: I = None
        self.r: F = None
        self.txt = txt

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

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