class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.y: C = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
m = D("m")
k = E("k")
a = F("a")
c = G("c")
h = H("h")
i = E("i")

d.w = m
d.t = l
l.x = h
l.t = i
l.s = b
b.y = c
b.s = d
b.r = m
b.u = m
b.z = l
b.p = l
b.o = i
m.s = c
m.v = b
m.y = b
m.u = d
m.o = h
k.t = c
a.s = k
a.o = k
a.q = b
a.p = i
a.y = i
a.u = d
c.r = m
c.z = i
c.y = b
h.t = m
h.x = i
i.t = c
assert h.t.s.z.t.r.u.t.s.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: E = None
        self.s: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: C = None
        self.y: C = None
        self.u: A = None
        self.o: H = None
        self.txt = txt

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

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

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

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

d = A("d")
l = B("l")
b = C("b")
m = D("m")
k = E("k")
a = F("a")
c = G("c")
h = H("h")
i = E("i")

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