class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: F = None
        self.t: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: D = None
        self.z: E = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: A = None
        self.y: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.x: G = None
        self.p: C = None
        self.t: A = None
        self.s: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.q: A = None
        self.o: D = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: D = None
        self.z: E = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: A = None
        self.y: H = None
        self.t: E = None
        self.r: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: B = None
        self.x: G = None
        self.p: C = None
        self.t: A = None
        self.s: D = None
        self.q: E = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.q: A = None
        self.o: D = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

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