class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.u: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: A = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.s: A = None
        self.t: B = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.t: H = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: I = None
        self.y: B = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: A = None
        self.v: E = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: B = None
        self.s: A = None
        self.t: B = None
        self.z: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: E = None
        self.t: H = None
        self.r: H = None
        self.p: A = None
        self.txt = txt

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

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