class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: H = None
        self.u: A = None
        self.s: F = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.t: F = None
        self.z: F = None
        self.y: A = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.q: F = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.p: H = None
        self.u: A = None
        self.s: F = None
        self.o: G = None
        self.z: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.o: I = None
        self.t: F = None
        self.z: F = None
        self.y: A = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: D = None
        self.q: F = None
        self.x: I = None
        self.txt = txt

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

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

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

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