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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.y: B = None
        self.z: A = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.u: A = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: E = None
        self.v: B = None
        self.r: C = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: F = None
        self.y: B = None
        self.z: A = None
        self.s: A = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: G = None
        self.u: A = None
        self.x: E = None
        self.p: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: E = None
        self.v: B = None
        self.r: C = None
        self.s: E = None
        self.p: A = None
        self.txt = txt

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

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