class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: F = None
        self.t: C = None
        self.z: D = None
        self.s: I = None
        self.r: D = None
        self.p: H = None
        self.w: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.z: I = None
        self.t: D = None
        self.o: C = None
        self.x: D = None
        self.p: B = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: H = None
        self.p: I = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: G = None
        self.z: I = None
        self.t: D = None
        self.o: C = None
        self.x: D = None
        self.p: B = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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