class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: C = None
        self.z: D = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.x: I = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: C = None
        self.s: F = None
        self.p: G = None
        self.r: D = None
        self.w: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.x: E = None
        self.r: B = None
        self.s: C = None
        self.o: D = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: D = None
        self.z: C = None
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.p: I = None
        self.x: I = None
        self.o: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: C = None
        self.s: F = None
        self.p: G = None
        self.r: D = None
        self.w: G = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: A = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: F = None
        self.x: E = None
        self.r: B = None
        self.s: C = None
        self.o: D = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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