class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.z: I = None
        self.p: G = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

h = A("h")
a = B("a")
m = C("m")
g = D("g")
e = E("e")
d = F("d")
l = G("l")
f = H("f")
j = I("j")

h.q = m
h.w = m
h.s = d
h.z = j
h.p = l
h.r = e
a.p = d
a.t = j
a.v = j
m.v = d
m.y = d
m.r = j
g.s = l
g.x = a
e.r = a
e.w = a
e.u = j
d.y = l
d.u = f
d.v = f
d.w = h
l.o = d
l.t = e
l.y = m
f.p = a
f.s = a
f.w = m
j.t = a
j.u = m
j.v = g
assert g.x.p.w.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: F = None
        self.z: I = None
        self.p: G = None
        self.r: E = None
        self.w: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: I = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: F = None
        self.r: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: H = None
        self.v: H = None
        self.w: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: C = None
        self.v: D = None
        self.txt = txt

h = A("h")
a = B("a")
m = C("m")
g = D("g")
e = E("e")
d = F("d")
l = G("l")
f = H("f")
j = I("j")

h.q = m
h.w = m
h.s = d
h.z = j
h.p = l
h.r = e
a.p = d
a.t = j
a.v = j
m.v = d
m.y = d
m.r = j
g.s = l
g.x = a
e.r = a
e.w = a
e.u = j
d.y = l
d.u = f
d.v = f
d.w = h
l.o = d
l.t = e
l.y = m
f.p = a
f.s = a
f.w = m
j.t = a
j.u = m
j.v = g
assert g.x.p.w.z.v.txt == "g"