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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: G = None
        self.p: G = None
        self.v: I = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: G = None
        self.x: G = None
        self.p: G = None
        self.v: I = None
        self.s: F = None
        self.txt = txt

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

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

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