class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.y: D = None
        self.q: C = None
        self.s: B = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.u: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: H = None
        self.txt = txt

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

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

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

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