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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.v: C = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.u: D = None
        self.t: F = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.t: C = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: C = None
        self.v: C = None
        self.y: G = None
        self.w: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.r: A = None
        self.u: D = None
        self.t: F = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: B = None
        self.t: C = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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