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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.v: F = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

a = A("a")
b = B("b")
d = C("d")
f = D("f")
j = E("j")
k = F("k")
h = G("h")
i = D("i")
n = G("n")
m = C("m")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: B = None
        self.s: C = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: A = None
        self.v: F = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

a = A("a")
b = B("b")
d = C("d")
f = D("f")
j = E("j")
k = F("k")
h = G("h")
i = D("i")
n = G("n")
m = C("m")

a.y = b
a.q = b
a.v = k
a.s = d
b.r = h
b.q = f
d.u = k
d.y = b
d.s = m
f.v = k
f.z = k
f.o = n
j.p = a
j.o = k
j.s = k
j.u = d
j.t = m
j.z = h
k.o = j
k.v = d
k.w = a
k.u = a
k.s = b
h.x = b
h.r = a
h.v = k
h.q = k
h.u = f
i.v = k
i.z = k
i.o = h
n.x = b
n.r = a
n.v = k
n.q = k
n.u = f
m.u = k
m.y = b
m.s = d
assert i.o.r.y.q.z.v.y.r.txt == "h"