class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.w: C = None
        self.z: D = None
        self.x: G = None
        self.t: H = None
        self.r: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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