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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: F = None
        self.w: G = None
        self.o: B = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

m = A("m")
h = B("h")
d = C("d")
e = D("e")
j = E("j")
a = F("a")
l = G("l")
f = H("f")

m.x = l
m.v = d
m.s = e
m.u = h
h.x = d
d.o = h
d.w = m
e.r = f
e.p = f
e.s = a
e.w = l
e.o = h
j.p = m
j.q = m
j.u = l
j.z = l
j.r = l
j.v = f
j.o = e
a.w = j
a.z = j
a.t = f
l.t = m
f.w = j
assert f.w.z.t.v.o.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: C = None
        self.s: D = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: F = None
        self.w: G = None
        self.o: B = None
        self.p: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

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

m = A("m")
h = B("h")
d = C("d")
e = D("e")
j = E("j")
a = F("a")
l = G("l")
f = H("f")

m.x = l
m.v = d
m.s = e
m.u = h
h.x = d
d.o = h
d.w = m
e.r = f
e.p = f
e.s = a
e.w = l
e.o = h
j.p = m
j.q = m
j.u = l
j.z = l
j.r = l
j.v = f
j.o = e
a.w = j
a.z = j
a.t = f
l.t = m
f.w = j
assert f.w.z.t.v.o.x.txt == "d"