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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

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