class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.r: G = None
        self.t: E = None
        self.p: H = None
        self.q: H = None
        self.x: E = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: H = None
        self.t: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: I = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: E = None
        self.r: H = None
        self.t: D = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: I = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: H = None
        self.t: C = None
        self.s: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: I = None
        self.w: C = None
        self.z: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: D = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: E = None
        self.r: H = None
        self.t: D = None
        self.z: D = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: I = None
        self.r: C = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: F = None
        self.r: B = None
        self.txt = txt

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

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