class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: H = None
        self.y: F = None
        self.t: I = None
        self.o: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.p: E = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: G = None
        self.s: I = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.o: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: B = None
        self.p: E = None
        self.q: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: G = None
        self.s: I = None
        self.w: H = None
        self.r: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: F = None
        self.o: A = None
        self.t: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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