class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.w: A = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

j.q = a
j.v = d
j.w = k
j.p = m
d.y = l
d.w = l
d.r = a
d.z = h
a.v = h
a.p = m
a.u = l
a.t = c
l.t = f
l.o = m
f.x = d
c.v = l
b.r = a
b.t = d
b.p = c
h.u = c
h.y = c
h.r = m
h.z = m
h.v = l
h.p = f
h.w = b
m.z = b
m.s = a
m.u = j
k.q = a
k.v = d
k.w = j
k.p = m
assert l.t.x.r.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: B = None
        self.w: A = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: D = None
        self.r: C = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: I = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: B = None
        self.p: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

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