class A:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: E = None
        self.s: B = None
        self.z: C = None
        self.r: G = None
        self.v: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: C = None
        self.s: G = None
        self.v: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.v: C = None
        self.t: A = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: B = None
        self.t: C = None
        self.s: G = None
        self.v: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: F = None
        self.o: C = None
        self.w: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: E = None
        self.v: C = None
        self.t: A = None
        self.p: A = None
        self.o: E = None
        self.txt = txt

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

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