class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: C = None
        self.r: E = None
        self.o: F = None
        self.w: C = None
        self.x: E = None
        self.s: E = None
        self.p: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.z: E = None
        self.o: H = None
        self.r: D = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: E = None
        self.r: A = None
        self.v: C = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: G = None
        self.z: E = None
        self.o: H = None
        self.r: D = None
        self.y: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.w: E = None
        self.r: A = None
        self.v: C = None
        self.s: A = None
        self.o: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: F = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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