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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.z: B = None
        self.t: H = None
        self.v: H = None
        self.u: C = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.u: H = None
        self.z: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: D = None
        self.q: G = None
        self.t: C = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: A = None
        self.z: B = None
        self.t: H = None
        self.v: H = None
        self.u: C = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: F = None
        self.u: H = None
        self.z: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: B = None
        self.r: D = None
        self.q: G = None
        self.t: C = None
        self.x: A = None
        self.u: G = None
        self.txt = txt

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

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