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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

f.p = a
f.v = a
f.y = b
f.q = e
f.u = d
f.s = i
m.o = a
m.r = c
m.p = d
a.r = k
a.v = d
a.w = m
a.t = i
a.p = i
a.x = f
k.w = i
e.t = i
i.p = b
i.u = k
i.r = e
i.o = d
d.s = k
d.v = k
d.u = b
d.w = i
d.p = c
d.o = a
b.p = a
b.v = a
b.y = f
b.q = e
b.u = d
b.s = i
c.o = a
c.r = m
c.p = d
assert d.p.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: A = None
        self.q: E = None
        self.v: C = None
        self.u: G = None
        self.s: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

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

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

f.p = a
f.v = a
f.y = b
f.q = e
f.u = d
f.s = i
m.o = a
m.r = c
m.p = d
a.r = k
a.v = d
a.w = m
a.t = i
a.p = i
a.x = f
k.w = i
e.t = i
i.p = b
i.u = k
i.r = e
i.o = d
d.s = k
d.v = k
d.u = b
d.w = i
d.p = c
d.o = a
b.p = a
b.v = a
b.y = f
b.q = e
b.u = d
b.s = i
c.o = a
c.r = m
c.p = d
assert d.p.p.w.txt == "i"