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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: G = None
        self.v: G = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.p: G = None
        self.v: G = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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