class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: G = None
        self.t: C = None
        self.p: G = None
        self.o: E = None
        self.v: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

d = A("d")
e = B("e")
l = C("l")
f = D("f")
b = E("b")
k = F("k")
n = G("n")
c = A("c")

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: A = None
        self.q: C = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

d = A("d")
e = B("e")
l = C("l")
f = D("f")
b = E("b")
k = F("k")
n = G("n")
c = A("c")

d.s = l
d.t = l
d.r = n
d.p = n
d.o = b
d.v = b
e.v = b
e.z = d
e.q = l
e.o = l
l.w = b
l.r = e
l.t = e
l.q = f
l.o = f
l.x = f
l.y = c
f.z = b
f.w = b
f.s = c
f.o = n
f.u = n
b.r = f
b.p = k
k.r = b
k.w = f
k.u = c
k.z = d
k.p = e
k.o = e
k.v = e
n.p = e
n.s = l
n.w = l
c.s = l
c.t = l
c.r = n
c.p = n
c.o = b
c.v = b
assert c.p.w.r.txt == "e"