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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: A = None
        self.w: D = None
        self.p: G = None
        self.t: C = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
i = B("i")
f = C("f")
k = D("k")
a = E("a")
d = F("d")
l = G("l")
g = A("g")
m = E("m")

c.p = g
c.z = i
c.q = m
c.r = m
c.y = l
i.o = k
i.w = k
i.z = c
i.p = l
i.t = f
i.x = a
i.y = m
f.p = k
f.y = a
k.o = a
k.u = l
k.p = f
a.t = l
a.o = m
d.t = f
d.y = l
d.w = l
d.q = c
d.o = k
d.r = k
l.z = c
l.q = m
g.p = c
g.z = i
g.q = a
g.r = a
g.y = l
m.t = l
m.o = a
assert m.o.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.q: E = None
        self.r: E = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.z: A = None
        self.w: D = None
        self.p: G = None
        self.t: C = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
i = B("i")
f = C("f")
k = D("k")
a = E("a")
d = F("d")
l = G("l")
g = A("g")
m = E("m")

c.p = g
c.z = i
c.q = m
c.r = m
c.y = l
i.o = k
i.w = k
i.z = c
i.p = l
i.t = f
i.x = a
i.y = m
f.p = k
f.y = a
k.o = a
k.u = l
k.p = f
a.t = l
a.o = m
d.t = f
d.y = l
d.w = l
d.q = c
d.o = k
d.r = k
l.z = c
l.q = m
g.p = c
g.z = i
g.q = a
g.r = a
g.y = l
m.t = l
m.o = a
assert m.o.t.q.txt == "m"