class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.r: H = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: D = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

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

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

j.t = c
j.s = m
j.r = f
j.v = e
j.p = l
e.p = n
e.z = n
e.o = k
m.x = n
k.y = n
k.z = l
k.x = c
a.p = e
a.u = l
l.y = c
l.w = f
l.v = f
l.u = g
g.q = k
g.t = l
g.p = l
f.o = k
f.p = j
n.x = e
c.p = e
c.u = l
assert a.u.u.t.u.q.x.u.y.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.s: C = None
        self.r: H = None
        self.v: B = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.o: D = None
        self.z: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: H = None
        self.v: H = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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