class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.w: E = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: G = None
        self.s: A = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
j = C("j")
d = D("d")
n = E("n")
k = F("k")
h = G("h")
a = H("a")
b = E("b")

l.o = k
l.s = h
l.q = h
e.u = k
e.y = l
e.s = l
e.w = n
j.o = a
j.s = k
d.x = l
d.o = k
d.v = j
n.t = k
n.y = k
n.w = h
n.u = h
n.s = l
k.w = n
k.y = l
h.s = l
a.v = e
a.z = k
b.t = k
b.y = k
b.w = h
b.u = h
b.s = l
assert a.v.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: G = None
        self.q: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: A = None
        self.w: E = None
        self.s: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: G = None
        self.s: A = None
        self.u: G = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: A = None
        self.txt = txt

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

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

l = A("l")
e = B("e")
j = C("j")
d = D("d")
n = E("n")
k = F("k")
h = G("h")
a = H("a")
b = E("b")

l.o = k
l.s = h
l.q = h
e.u = k
e.y = l
e.s = l
e.w = n
j.o = a
j.s = k
d.x = l
d.o = k
d.v = j
n.t = k
n.y = k
n.w = h
n.u = h
n.s = l
k.w = n
k.y = l
h.s = l
a.v = e
a.z = k
b.t = k
b.y = k
b.w = h
b.u = h
b.s = l
assert a.v.u.y.txt == "l"