class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: G = None
        self.y: D = None
        self.s: H = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: D = None
        self.w: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.s: C = None
        self.o: H = None
        self.txt = txt

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

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

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

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