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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.o: E = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.z: G = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.s: F = None
        self.p: B = None
        self.z: C = None
        self.r: C = None
        self.v: F = None
        self.y: I = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.s: B = None
        self.w: C = None
        self.x: C = None
        self.t: E = None
        self.z: A = None
        self.u: F = None
        self.txt = txt

n = A("n")
b = B("b")
i = C("i")
f = D("f")
j = E("j")
k = F("k")
m = G("m")
g = H("g")
a = I("a")

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.z: F = None
        self.o: E = None
        self.p: E = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: I = None
        self.z: G = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.s: F = None
        self.p: B = None
        self.z: C = None
        self.r: C = None
        self.v: F = None
        self.y: I = None
        self.q: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: E = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.v: A = None
        self.s: B = None
        self.w: C = None
        self.x: C = None
        self.t: E = None
        self.z: A = None
        self.u: F = None
        self.txt = txt

n = A("n")
b = B("b")
i = C("i")
f = D("f")
j = E("j")
k = F("k")
m = G("m")
g = H("g")
a = I("a")

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