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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.v: A = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

f = A("f")
h = B("h")
e = C("e")
c = D("c")
g = E("g")
n = F("n")
k = G("k")
d = F("d")
i = D("i")
l = C("l")

f.w = e
h.s = c
e.p = f
e.u = k
e.y = k
c.t = k
c.y = d
c.s = h
c.q = f
c.p = e
c.x = i
g.s = e
g.w = e
g.u = e
g.r = h
g.x = h
g.q = f
n.x = f
n.v = f
n.t = k
n.w = k
n.p = h
k.u = l
k.s = g
k.v = n
k.x = f
k.y = d
k.q = c
k.p = i
d.x = f
d.v = f
d.t = k
d.w = k
d.p = h
i.t = k
i.y = d
i.s = h
i.q = f
i.p = e
i.x = c
l.p = f
l.u = k
l.y = k
assert f.w.p.w.u.y.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: G = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: G = None
        self.v: A = None
        self.w: G = None
        self.p: B = None
        self.txt = txt

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

f = A("f")
h = B("h")
e = C("e")
c = D("c")
g = E("g")
n = F("n")
k = G("k")
d = F("d")
i = D("i")
l = C("l")

f.w = e
h.s = c
e.p = f
e.u = k
e.y = k
c.t = k
c.y = d
c.s = h
c.q = f
c.p = e
c.x = i
g.s = e
g.w = e
g.u = e
g.r = h
g.x = h
g.q = f
n.x = f
n.v = f
n.t = k
n.w = k
n.p = h
k.u = l
k.s = g
k.v = n
k.x = f
k.y = d
k.q = c
k.p = i
d.x = f
d.v = f
d.t = k
d.w = k
d.p = h
i.t = k
i.y = d
i.s = h
i.q = f
i.p = e
i.x = c
l.p = f
l.u = k
l.y = k
assert f.w.p.w.u.y.p.txt == "h"