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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.o: H = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.w: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.o: H = None
        self.v: F = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: C = None
        self.w: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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