class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: I = None
        self.u: I = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.w: B = None
        self.q: I = None
        self.z: I = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: I = None
        self.u: I = None
        self.r: A = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: G = None
        self.w: B = None
        self.q: I = None
        self.z: I = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: H = None
        self.txt = txt

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

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