class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.w: H = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.w: G = None
        self.s: H = None
        self.y: D = None
        self.q: B = None
        self.r: H = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: G = None
        self.p: B = None
        self.x: E = None
        self.r: C = None
        self.q: A = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

n = A("n")
i = B("i")
d = C("d")
f = D("f")
g = E("g")
a = F("a")
b = G("b")
l = H("l")
c = D("c")
m = G("m")

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: B = None
        self.w: H = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: G = None
        self.s: B = None
        self.w: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: D = None
        self.w: G = None
        self.s: H = None
        self.y: D = None
        self.q: B = None
        self.r: H = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: G = None
        self.p: B = None
        self.x: E = None
        self.r: C = None
        self.q: A = None
        self.o: D = None
        self.u: A = None
        self.txt = txt

n = A("n")
i = B("i")
d = C("d")
f = D("f")
g = E("g")
a = F("a")
b = G("b")
l = H("l")
c = D("c")
m = G("m")

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