class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: G = None
        self.z: E = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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