class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: C = None
        self.t: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: B = None
        self.y: H = None
        self.p: B = None
        self.u: H = None
        self.r: F = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.s: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: D = None
        self.o: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: B = None
        self.y: H = None
        self.p: B = None
        self.u: H = None
        self.r: F = None
        self.s: B = None
        self.t: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: E = None
        self.s: A = None
        self.w: E = None
        self.t: B = None
        self.txt = txt

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

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

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