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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: C = None
        self.x: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

g = A("g")
i = B("i")
b = C("b")
e = D("e")
j = E("j")
l = F("l")
d = G("d")
m = H("m")

g.t = m
g.s = d
g.y = d
i.y = e
i.u = g
i.s = b
i.x = m
i.z = l
i.q = l
b.p = d
b.r = l
e.r = g
e.s = g
e.o = j
j.o = d
j.x = e
j.v = m
l.r = g
l.t = g
l.y = e
l.v = i
d.r = j
d.z = j
d.v = e
d.o = e
d.q = l
d.s = i
m.z = e
assert e.o.x.r.s.o.r.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.s: G = None
        self.y: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: A = None
        self.s: C = None
        self.x: H = None
        self.z: F = None
        self.q: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: D = None
        self.v: B = None
        self.t: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

g = A("g")
i = B("i")
b = C("b")
e = D("e")
j = E("j")
l = F("l")
d = G("d")
m = H("m")

g.t = m
g.s = d
g.y = d
i.y = e
i.u = g
i.s = b
i.x = m
i.z = l
i.q = l
b.p = d
b.r = l
e.r = g
e.s = g
e.o = j
j.o = d
j.x = e
j.v = m
l.r = g
l.t = g
l.y = e
l.v = i
d.r = j
d.z = j
d.v = e
d.o = e
d.q = l
d.s = i
m.z = e
assert e.o.x.r.s.o.r.t.z.txt == "e"