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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.u: D = None
        self.y: E = None
        self.w: A = None
        self.q: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: D = None
        self.u: D = None
        self.y: E = None
        self.w: A = None
        self.q: D = None
        self.z: C = None
        self.txt = txt

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

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