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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.s: E = None
        self.w: G = None
        self.q: H = None
        self.p: C = None
        self.v: A = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.w: D = None
        self.u: C = None
        self.s: A = None
        self.v: A = None
        self.t: C = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.y: H = None
        self.t: D = None
        self.v: H = None
        self.s: A = None
        self.u: G = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: H = None
        self.y: C = None
        self.s: E = None
        self.w: G = None
        self.q: H = None
        self.p: C = None
        self.v: A = None
        self.x: H = None
        self.o: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.x: E = None
        self.w: D = None
        self.u: C = None
        self.s: A = None
        self.v: A = None
        self.t: C = None
        self.r: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: E = None
        self.y: H = None
        self.t: D = None
        self.v: H = None
        self.s: A = None
        self.u: G = None
        self.p: A = None
        self.w: G = None
        self.txt = txt

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

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