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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.o: E = None
        self.x: E = None
        self.z: F = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: C = None
        self.s: A = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: E = None
        self.o: E = None
        self.x: E = None
        self.z: F = None
        self.p: E = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.t: C = None
        self.s: A = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: E = None
        self.r: B = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: D = None
        self.w: D = None
        self.txt = txt

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

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