class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: H = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.w: G = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

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

i.w = b
i.x = b
i.v = f
i.s = l
l.v = h
l.y = i
h.r = j
d.v = c
d.u = j
d.y = f
m.y = b
m.t = b
m.v = f
f.x = h
f.v = b
f.r = d
g.o = f
g.y = m
g.w = j
g.s = j
g.v = j
b.p = f
b.r = f
j.o = f
j.y = m
j.w = g
j.s = g
j.v = g
c.w = b
c.x = b
c.v = f
c.s = l
assert h.r.y.v.v.p.v.p.x.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: H = None
        self.v: F = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: E = None
        self.w: G = None
        self.s: G = None
        self.v: G = None
        self.txt = txt

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

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

i.w = b
i.x = b
i.v = f
i.s = l
l.v = h
l.y = i
h.r = j
d.v = c
d.u = j
d.y = f
m.y = b
m.t = b
m.v = f
f.x = h
f.v = b
f.r = d
g.o = f
g.y = m
g.w = j
g.s = j
g.v = j
b.p = f
b.r = f
j.o = f
j.y = m
j.w = g
j.s = g
j.v = g
c.w = b
c.x = b
c.v = f
c.s = l
assert h.r.y.v.v.p.v.p.x.r.o.txt == "f"