class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: F = None
        self.q: E = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: A = None
        self.p: C = None
        self.o: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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