class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.r: G = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

c.p = k
c.z = k
c.q = n
c.r = h
c.t = m
f.s = b
f.q = m
k.t = a
m.w = k
m.u = h
m.t = h
m.q = n
m.o = j
a.r = m
a.o = m
n.t = h
n.s = h
n.v = b
n.r = b
n.q = a
n.p = a
n.z = l
h.r = m
h.x = f
h.t = j
b.s = f
b.q = m
j.p = k
j.z = k
j.q = n
j.r = h
j.t = m
l.t = h
l.s = h
l.v = b
l.q = a
l.p = a
l.z = n
l.r = f
assert m.o.q.s.x.s.s.s.q.o.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: F = None
        self.r: G = None
        self.t: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

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