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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.z: D = None
        self.q: J = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: G = None
        self.z: D = None
        self.q: J = None
        self.w: A = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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