class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: F = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: H = None
        self.y: I = None
        self.txt = txt

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

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