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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.p: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: C = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.s: F = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

e = A("e")
m = B("m")
c = C("c")
b = D("b")
l = E("l")
h = F("h")
d = G("d")
a = G("a")
j = B("j")

e.x = c
e.u = c
e.o = d
e.v = d
m.x = c
m.s = l
m.p = j
m.z = b
m.q = e
c.r = b
c.v = m
b.v = e
b.q = m
b.u = d
b.s = c
l.s = b
l.r = m
l.w = c
l.y = c
l.v = e
h.y = l
h.v = c
d.r = j
d.u = j
d.t = a
d.s = h
d.p = m
a.r = m
a.p = m
a.t = d
a.s = h
a.u = j
j.x = c
j.s = l
j.p = m
j.z = b
j.q = e
assert c.v.s.y.v.p.q.u.r.u.txt == "
class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: G = None
        self.u: C = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.s: E = None
        self.p: B = None
        self.z: D = None
        self.q: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.r: B = None
        self.w: C = None
        self.y: C = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: G = None
        self.s: F = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

e = A("e")
m = B("m")
c = C("c")
b = D("b")
l = E("l")
h = F("h")
d = G("d")
a = G("a")
j = B("j")

e.x = c
e.u = c
e.o = d
e.v = d
m.x = c
m.s = l
m.p = j
m.z = b
m.q = e
c.r = b
c.v = m
b.v = e
b.q = m
b.u = d
b.s = c
l.s = b
l.r = m
l.w = c
l.y = c
l.v = e
h.y = l
h.v = c
d.r = j
d.u = j
d.t = a
d.s = h
d.p = m
a.r = m
a.p = m
a.t = d
a.s = h
a.u = j
j.x = c
j.s = l
j.p = m
j.z = b
j.q = e
assert c.v.s.y.v.p.q.u.r.u.txt == "d"