class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.y: B = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.s: B = None
        self.p: A = None
        self.w: E = None
        self.x: C = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

b.t = a
b.v = l
b.u = c
e.o = n
n.s = e
n.y = e
n.u = a
n.w = h
a.w = n
a.q = l
a.x = m
a.r = e
a.y = e
j.s = a
j.u = a
m.u = l
m.t = l
m.s = e
m.p = b
m.w = j
m.x = c
m.r = c
m.q = g
l.x = m
h.w = a
g.t = e
c.s = e
c.y = e
c.u = a
c.w = h
assert b.t.x.p.u.u.w.w.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: G = None
        self.u: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: D = None
        self.y: B = None
        self.w: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.t: G = None
        self.s: B = None
        self.p: A = None
        self.w: E = None
        self.x: C = None
        self.q: I = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

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