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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.q: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
f = C("f")
n = D("n")
j = E("j")
i = F("i")
c = G("c")
e = E("e")
h = E("h")

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: D = None
        self.q: D = None
        self.p: D = None
        self.t: D = None
        self.txt = txt

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

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

g = A("g")
k = B("k")
f = C("f")
n = D("n")
j = E("j")
i = F("i")
c = G("c")
e = E("e")
h = E("h")

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