class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.u: H = None
        self.r: G = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: H = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: I = None
        self.s: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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