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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: H = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

d = A("d")
e = B("e")
l = C("l")
i = D("i")
m = E("m")
j = F("j")
g = G("g")
b = H("b")
a = A("a")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: H = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: H = None
        self.txt = txt

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

d = A("d")
e = B("e")
l = C("l")
i = D("i")
m = E("m")
j = F("j")
g = G("g")
b = H("b")
a = A("a")

d.v = b
d.p = b
d.z = e
d.y = i
d.t = i
e.o = m
l.s = d
l.x = i
i.w = b
i.x = b
i.r = d
i.s = m
m.w = e
m.p = b
j.z = i
j.s = a
j.x = b
g.q = b
g.y = b
b.y = e
b.t = d
a.v = b
a.p = b
a.z = e
a.y = i
a.t = i
assert i.x.y.o.w.o.w.o.txt == "m"