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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

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

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

b.o = j
b.y = j
b.s = j
b.z = i
m.s = c
m.z = j
m.p = j
j.v = l
j.o = i
j.w = k
j.u = m
j.p = c
i.z = c
i.w = j
i.v = d
d.o = j
k.v = d
k.q = j
k.u = c
k.w = l
l.q = c
l.x = k
c.z = d
c.p = b
assert i.w.w.q.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.y: C = None
        self.s: C = None
        self.z: D = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: C = None
        self.u: H = None
        self.w: G = None
        self.txt = txt

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

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

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

b.o = j
b.y = j
b.s = j
b.z = i
m.s = c
m.z = j
m.p = j
j.v = l
j.o = i
j.w = k
j.u = m
j.p = c
i.z = c
i.w = j
i.v = d
d.o = j
k.v = d
k.q = j
k.u = c
k.w = l
l.q = c
l.x = k
c.z = d
c.p = b
assert i.w.w.q.w.w.txt == "l"