class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.o: E = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.p: I = None
        self.x: H = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.r: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: A = None
        self.o: E = None
        self.s: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.u: D = None
        self.p: I = None
        self.x: H = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: F = None
        self.r: B = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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