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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: F = None
        self.u: G = None
        self.s: B = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

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

h = A("h")
d = B("d")
n = C("n")
a = D("a")
c = E("c")
f = F("f")
l = G("l")
m = F("m")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: F = None
        self.u: G = None
        self.s: B = None
        self.t: G = None
        self.q: A = None
        self.txt = txt

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

h = A("h")
d = B("d")
n = C("n")
a = D("a")
c = E("c")
f = F("f")
l = G("l")
m = F("m")

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