class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: B = None
        self.y: E = None
        self.z: E = None
        self.s: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.x: G = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.t: E = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

i = A("i")
k = B("k")
n = C("n")
h = D("h")
c = E("c")
j = F("j")
b = G("b")
f = H("f")
e = B("e")
d = H("d")

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.y: H = None
        self.x: G = None
        self.r: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: E = None
        self.t: E = None
        self.v: H = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: H = None
        self.p: E = None
        self.y: G = None
        self.txt = txt

i = A("i")
k = B("k")
n = C("n")
h = D("h")
c = E("c")
j = F("j")
b = G("b")
f = H("f")
e = B("e")
d = H("d")

i.r = e
i.x = e
i.y = c
i.z = c
i.s = c
k.o = f
k.y = f
k.x = b
k.r = c
k.q = h
n.r = k
n.w = c
n.t = c
n.u = c
n.v = d
h.r = e
h.p = e
h.u = j
h.z = j
h.s = f
c.s = h
c.x = i
c.y = i
j.q = e
j.s = d
b.o = c
b.u = i
f.x = c
f.p = c
f.u = d
f.y = b
e.o = f
e.y = f
e.x = b
e.r = c
e.q = h
d.x = c
d.p = c
d.u = f
d.y = b
assert f.y.o.x.txt == "i"