class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: H = None
        self.o: I = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: G = None
        self.y: G = None
        self.x: E = None
        self.r: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.t: G = None
        self.y: G = None
        self.x: E = None
        self.r: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: H = None
        self.v: B = None
        self.txt = txt

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

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