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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

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

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

f = A("f")
n = B("n")
i = C("i")
k = D("k")
m = E("m")
a = F("a")
d = G("d")
g = H("g")
c = F("c")

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: H = None
        self.r: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.y: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.p: H = None
        self.s: G = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: B = None
        self.v: C = None
        self.r: F = None
        self.txt = txt

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

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

f = A("f")
n = B("n")
i = C("i")
k = D("k")
m = E("m")
a = F("a")
d = G("d")
g = H("g")
c = F("c")

f.o = i
f.u = i
f.z = k
f.v = k
f.w = d
f.y = d
f.r = d
f.s = g
n.s = g
n.q = g
n.r = i
i.o = g
i.v = g
i.t = m
i.u = d
i.s = d
i.y = c
i.z = k
i.x = k
k.q = i
k.y = m
k.x = n
m.u = d
m.v = d
m.s = d
m.p = g
m.x = i
a.u = c
a.r = c
a.t = n
a.v = i
d.s = g
d.r = g
d.p = g
d.t = f
d.u = f
d.v = c
d.x = i
g.r = m
g.x = m
g.o = m
g.u = f
g.s = i
g.q = k
c.u = a
c.r = a
c.t = n
c.v = i
assert a.u.r.v.y.u.t.r.txt == "i"