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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

g = A("g")
b = B("b")
a = C("a")
j = D("j")
e = E("e")
h = F("h")
l = G("l")
m = H("m")
f = G("f")
i = D("i")

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: H = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: C = None
        self.s: E = None
        self.txt = txt

g = A("g")
b = B("b")
a = C("a")
j = D("j")
e = E("e")
h = F("h")
l = G("l")
m = H("m")
f = G("f")
i = D("i")

g.x = m
g.v = f
b.p = e
b.z = h
a.z = b
a.q = g
a.s = e
j.q = g
j.x = g
j.u = a
j.r = a
j.s = e
e.t = h
e.y = m
e.u = g
h.w = m
h.u = a
l.x = e
l.u = e
l.r = h
l.t = h
l.q = b
m.p = e
m.s = e
m.t = a
f.x = e
f.u = e
f.r = h
f.t = h
f.q = b
i.q = g
i.x = g
i.u = a
i.r = a
i.s = e
assert l.t.w.p.y.s.u.v.q.txt == "b"