class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.z: B = None
        self.t: D = None
        self.u: C = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

c = A("c")
j = B("j")
k = C("k")
a = D("a")
n = E("n")
e = F("e")
b = G("b")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: A = None
        self.w: E = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: F = None
        self.u: A = None
        self.t: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: D = None
        self.x: E = None
        self.txt = txt

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

c = A("c")
j = B("j")
k = C("k")
a = D("a")
n = E("n")
e = F("e")
b = G("b")

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