class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.x: D = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.p: D = None
        self.r: E = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

i.o = n
i.v = j
i.x = j
i.r = j
i.p = h
h.u = d
h.p = l
h.v = i
l.z = b
j.o = l
m.z = n
m.u = d
n.v = l
n.s = l
n.r = j
n.x = i
n.q = i
d.u = h
d.z = l
b.t = m
b.r = m
b.x = d
b.s = d
b.p = j
b.y = j
assert h.p.z.p.o.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: D = None
        self.x: D = None
        self.p: B = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: G = None
        self.p: D = None
        self.r: E = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

i.o = n
i.v = j
i.x = j
i.r = j
i.p = h
h.u = d
h.p = l
h.v = i
l.z = b
j.o = l
m.z = n
m.u = d
n.v = l
n.s = l
n.r = j
n.x = i
n.q = i
d.u = h
d.z = l
b.t = m
b.r = m
b.x = d
b.s = d
b.p = j
b.y = j
assert h.p.z.p.o.txt == "l"