class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.z: H = None
        self.u: C = None
        self.v: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.w: B = None
        self.p: C = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: H = None
        self.s: D = None
        self.y: D = None
        self.p: B = None
        self.t: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.x: C = None
        self.t: H = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: A = None
        self.w: B = None
        self.p: C = None
        self.r: B = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: H = None
        self.s: D = None
        self.y: D = None
        self.p: B = None
        self.t: C = None
        self.w: A = None
        self.r: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: F = None
        self.x: C = None
        self.t: H = None
        self.r: B = None
        self.txt = txt

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

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

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