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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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