class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.o: E = None
        self.r: G = None
        self.x: H = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.p: G = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.x: A = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: C = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.z: A = None
        self.u: B = None
        self.r: E = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: B = None
        self.p: G = None
        self.t: G = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: C = None
        self.x: A = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

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

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

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