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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.y: G = None
        self.w: G = None
        self.x: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.p: H = None
        self.t: A = None
        self.w: B = None
        self.o: B = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.y: F = None
        self.z: C = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.y: G = None
        self.w: G = None
        self.x: F = None
        self.r: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: B = None
        self.p: H = None
        self.t: A = None
        self.w: B = None
        self.o: B = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: H = None
        self.y: F = None
        self.z: C = None
        self.x: A = None
        self.v: H = None
        self.txt = txt

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

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

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