class A:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: G = None
        self.r: H = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.y: A = None
        self.w: B = None
        self.x: G = None
        self.u: F = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: C = None
        self.u: D = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: G = None
        self.r: H = None
        self.q: C = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: I = None
        self.y: A = None
        self.w: B = None
        self.x: G = None
        self.u: F = None
        self.r: G = None
        self.z: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.v: C = None
        self.u: D = None
        self.o: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: I = None
        self.t: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

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