class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: E = None
        self.s: A = None
        self.r: C = None
        self.w: H = None
        self.t: G = None
        self.u: G = None
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.x: G = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.r: C = None
        self.u: E = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: C = None
        self.x: G = None
        self.y: B = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: B = None
        self.r: C = None
        self.u: E = None
        self.z: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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