class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.z: B = None
        self.p: E = None
        self.w: H = None
        self.x: I = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: I = None
        self.x: G = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.t: F = None
        self.z: B = None
        self.p: E = None
        self.w: H = None
        self.x: I = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: B = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.r: I = None
        self.x: G = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

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

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

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