class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: H = None
        self.s: G = None
        self.o: D = None
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.v: A = None
        self.y: C = None
        self.u: A = None
        self.z: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.z: E = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: A = None
        self.v: A = None
        self.y: C = None
        self.u: A = None
        self.z: G = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: H = None
        self.z: E = None
        self.x: E = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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