class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: I = None
        self.p: F = None
        self.v: B = None
        self.q: F = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.z: A = None
        self.q: C = None
        self.x: B = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.w: H = None
        self.p: D = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.p: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

c.t = i
c.r = g
c.p = j
c.q = j
c.v = e
c.y = e
c.s = n
e.t = h
e.y = g
e.p = j
n.y = c
n.s = i
n.z = j
i.o = j
k.u = j
k.y = j
k.v = e
k.x = e
k.z = c
k.q = n
k.w = d
j.t = i
j.p = i
j.q = i
j.y = h
j.w = d
j.u = k
h.q = d
h.o = c
h.p = k
h.y = k
h.z = j
d.v = n
d.q = i
d.p = i
d.x = e
g.o = d
assert i.o.q.o.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: I = None
        self.p: F = None
        self.v: B = None
        self.q: F = None
        self.s: C = None
        self.y: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: D = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.v: B = None
        self.z: A = None
        self.q: C = None
        self.x: B = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: G = None
        self.w: H = None
        self.p: D = None
        self.u: E = None
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: A = None
        self.p: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: D = None
        self.x: B = None
        self.p: D = None
        self.txt = txt

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

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

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