class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: H = None
        self.w: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.r: G = None
        self.w: A = None
        self.o: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.z: E = None
        self.p: E = None
        self.w: H = None
        self.r: H = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.r: G = None
        self.w: A = None
        self.o: C = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: F = None
        self.z: E = None
        self.p: E = None
        self.w: H = None
        self.r: H = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

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

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

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