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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: A = None
        self.p: E = None
        self.z: D = None
        self.w: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.z: C = None
        self.r: F = None
        self.p: B = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: G = None
        self.v: A = None
        self.p: E = None
        self.z: D = None
        self.w: C = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.y: D = None
        self.z: C = None
        self.r: F = None
        self.p: B = None
        self.t: F = None
        self.v: A = None
        self.txt = txt

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

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