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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.p: B = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

m = A("m")
d = B("d")
i = C("i")
j = D("j")
l = E("l")
e = F("e")
a = G("a")
k = C("k")
f = B("f")
g = G("g")

m.s = l
m.w = l
m.y = l
m.x = j
m.q = e
d.y = j
i.w = g
i.s = l
i.u = e
i.o = j
j.u = e
j.r = a
j.p = f
j.q = g
j.o = k
l.u = i
e.v = a
a.u = m
k.w = a
k.s = l
k.u = e
k.o = j
f.y = j
g.u = m
assert f.y.o.u.v.u.q.v.u.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: E = None
        self.y: E = None
        self.x: D = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: G = None
        self.p: B = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

m = A("m")
d = B("d")
i = C("i")
j = D("j")
l = E("l")
e = F("e")
a = G("a")
k = C("k")
f = B("f")
g = G("g")

m.s = l
m.w = l
m.y = l
m.x = j
m.q = e
d.y = j
i.w = g
i.s = l
i.u = e
i.o = j
j.u = e
j.r = a
j.p = f
j.q = g
j.o = k
l.u = i
e.v = a
a.u = m
k.w = a
k.s = l
k.u = e
k.o = j
f.y = j
g.u = m
assert f.y.o.u.v.u.q.v.u.w.u.txt == "i"