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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: I = None
        self.t: I = None
        self.r: G = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: C = None
        self.z: D = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.z: A = None
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: I = None
        self.t: I = None
        self.r: G = None
        self.o: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: C = None
        self.z: D = None
        self.p: A = None
        self.u: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.y: C = None
        self.q: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: A = None
        self.z: A = None
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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