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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: B = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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