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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.p: G = None
        self.z: H = None
        self.q: G = None
        self.u: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.w: G = None
        self.v: B = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.t: F = None
        self.p: G = None
        self.z: H = None
        self.q: G = None
        self.u: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.q: G = None
        self.w: G = None
        self.v: B = None
        self.r: G = None
        self.s: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: C = None
        self.s: E = None
        self.o: D = None
        self.txt = txt

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

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

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

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