class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: F = None
        self.q: D = None
        self.t: F = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: F = None
        self.o: A = None
        self.y: E = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.o: B = None
        self.w: D = None
        self.p: F = None
        self.z: B = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

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

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

b = A("b")
e = B("e")
h = C("h")
l = D("l")
k = E("k")
n = F("n")
d = G("d")
g = H("g")
f = A("f")
i = G("i")

b.t = g
b.v = f
b.q = e
e.q = d
e.w = l
e.p = l
e.v = b
e.r = n
e.u = n
e.t = g
e.x = f
h.y = b
h.v = n
h.p = n
h.t = n
h.q = l
h.u = l
h.r = l
l.w = g
l.x = g
l.p = n
l.o = b
l.y = k
l.u = d
k.u = l
k.w = l
k.y = f
k.o = e
k.z = e
k.p = n
k.t = n
k.v = b
n.x = l
n.p = l
n.w = i
d.q = g
g.w = e
g.q = k
g.z = k
g.y = i
g.t = h
g.r = l
g.p = n
f.t = g
f.v = b
f.q = e
i.q = g
assert d.q.w.x.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: A = None
        self.q: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: F = None
        self.p: F = None
        self.q: D = None
        self.t: F = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: F = None
        self.o: A = None
        self.y: E = None
        self.u: G = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: A = None
        self.o: B = None
        self.w: D = None
        self.p: F = None
        self.z: B = None
        self.v: A = None
        self.t: F = None
        self.txt = txt

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

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

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

b = A("b")
e = B("e")
h = C("h")
l = D("l")
k = E("k")
n = F("n")
d = G("d")
g = H("g")
f = A("f")
i = G("i")

b.t = g
b.v = f
b.q = e
e.q = d
e.w = l
e.p = l
e.v = b
e.r = n
e.u = n
e.t = g
e.x = f
h.y = b
h.v = n
h.p = n
h.t = n
h.q = l
h.u = l
h.r = l
l.w = g
l.x = g
l.p = n
l.o = b
l.y = k
l.u = d
k.u = l
k.w = l
k.y = f
k.o = e
k.z = e
k.p = n
k.t = n
k.v = b
n.x = l
n.p = l
n.w = i
d.q = g
g.w = e
g.q = k
g.z = k
g.y = i
g.t = h
g.r = l
g.p = n
f.t = g
f.v = b
f.q = e
i.q = g
assert d.q.w.x.v.txt == "b"