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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: H = None
        self.u: H = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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