class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: B = None
        self.q: B = None
        self.y: G = None
        self.u: G = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.y: B = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: E = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: E = None
        self.y: B = None
        self.u: F = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: E = None
        self.x: C = None
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: A = None
        self.r: F = None
        self.txt = txt

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

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

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

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