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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.p: A = None
        self.w: D = None
        self.s: F = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.p: A = None
        self.w: D = None
        self.s: F = None
        self.r: C = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.u: F = None
        self.x: C = None
        self.z: E = None
        self.v: D = None
        self.txt = txt

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

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

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

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