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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: D = None
        self.t: E = None
        self.x: B = None
        self.p: B = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: F = None
        self.u: F = None
        self.o: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.q: D = None
        self.t: E = None
        self.x: B = None
        self.p: B = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: F = None
        self.r: F = None
        self.s: F = None
        self.txt = txt

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

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