class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: H = None
        self.z: H = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.w: H = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.x: F = None
        self.p: H = None
        self.v: C = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.r: H = None
        self.z: H = None
        self.o: I = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: E = None
        self.w: H = None
        self.v: C = None
        self.o: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: C = None
        self.x: F = None
        self.p: H = None
        self.v: C = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: I = None
        self.s: E = None
        self.txt = txt

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

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

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