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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.x: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.w: F = None
        self.s: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.w: G = None
        self.t: H = None
        self.o: C = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.p: C = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: B = None
        self.x: I = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.w: F = None
        self.s: G = None
        self.z: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.w: G = None
        self.t: H = None
        self.o: C = None
        self.x: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: E = None
        self.p: C = None
        self.t: D = None
        self.w: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: F = None
        self.txt = txt

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

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