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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.w: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.x: F = None
        self.s: H = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.p: C = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: D = None
        self.w: C = None
        self.s: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.q: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: E = None
        self.x: F = None
        self.s: H = None
        self.p: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.o: D = None
        self.p: C = None
        self.v: A = None
        self.txt = txt

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

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