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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
m = C("m")
g = D("g")
d = E("d")
a = F("a")
k = G("k")
b = H("b")
h = G("h")

i.v = a
i.q = g
l.z = g
m.w = i
m.v = g
m.z = g
m.r = g
m.u = k
m.x = h
m.q = l
g.o = m
g.v = h
g.y = a
g.t = a
g.q = i
d.r = b
d.t = l
d.w = l
d.o = m
a.o = l
a.v = l
a.q = l
a.x = m
a.z = d
a.w = d
a.t = k
k.z = g
k.w = b
k.o = l
b.p = m
b.s = k
b.q = a
h.z = g
h.w = b
h.o = l
assert l.z.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.w: B = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.o: B = None
        self.txt = txt

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

i = A("i")
l = B("l")
m = C("m")
g = D("g")
d = E("d")
a = F("a")
k = G("k")
b = H("b")
h = G("h")

i.v = a
i.q = g
l.z = g
m.w = i
m.v = g
m.z = g
m.r = g
m.u = k
m.x = h
m.q = l
g.o = m
g.v = h
g.y = a
g.t = a
g.q = i
d.r = b
d.t = l
d.w = l
d.o = m
a.o = l
a.v = l
a.q = l
a.x = m
a.z = d
a.w = d
a.t = k
k.z = g
k.w = b
k.o = l
b.p = m
b.s = k
b.q = a
h.z = g
h.w = b
h.o = l
assert l.z.v.w.txt == "b"